/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author JAVIER
 */
@Entity
@Table(name = "bdagrupados.cupones")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Cupones.findAll", query = "SELECT c FROM Cupones c"),
    @NamedQuery(name = "Cupones.findByIdCupon", query = "SELECT c FROM Cupones c WHERE c.idCupon = :idCupon"),
    @NamedQuery(name = "Cupones.findByCupVenta", query = "SELECT c FROM Cupones c WHERE c.cupVenta = :cupVenta"),
    @NamedQuery(name = "Cupones.findByCupCodigo", query = "SELECT c FROM Cupones c WHERE c.cupCodigo = :cupCodigo"),
    @NamedQuery(name = "Cupones.findByCupEstado", query = "SELECT c FROM Cupones c WHERE c.cupEstado = :cupEstado")})
public class Cupones implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_cupon")
    private Integer idCupon;
    @Column(name = "cup_venta")
    private Integer cupVenta;
    @Size(max = 60)
    @Column(name = "cup_codigo")
    private String cupCodigo;
    @Size(max = 45)
    @Column(name = "cup_estado")
    private String cupEstado;

    public Cupones() {
    }

    public Cupones(Integer idCupon) {
        this.idCupon = idCupon;
    }

    public Integer getIdCupon() {
        return idCupon;
    }

    public void setIdCupon(Integer idCupon) {
        this.idCupon = idCupon;
    }

    public Integer getCupVenta() {
        return cupVenta;
    }

    public void setCupVenta(Integer cupVenta) {
        this.cupVenta = cupVenta;
    }

    public String getCupCodigo() {
        return cupCodigo;
    }

    public void setCupCodigo(String cupCodigo) {
        this.cupCodigo = cupCodigo;
    }

    public String getCupEstado() {
        return cupEstado;
    }

    public void setCupEstado(String cupEstado) {
        this.cupEstado = cupEstado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCupon != null ? idCupon.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Cupones)) {
            return false;
        }
        Cupones other = (Cupones) object;
        if ((this.idCupon == null && other.idCupon != null) || (this.idCupon != null && !this.idCupon.equals(other.idCupon))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.entidades.Cupones[ idCupon=" + idCupon + " ]";
    }
    
}
